<?php
namespace Home\Controller;
use Think\Controller;
use Home\Model\AdminModel;
class ProblemController extends IndexController {
    public function index(){
        $this->display('index');
    }
    public function upload(){
        if(IS_POST) {
            M('problem')->data(I('post.'))->add();
            $this->success('上传成功', '/Bailey/index.php/Home/Problem/show', 1);
        }else{
            $this->display('upload');
        }
    }
    public function show(){
        $data['problem'] = M('problem')->select();
        var_dump($data['problem']);

        $this->assign($data);
        $this->display('show');


}

}
?>